##############################################################################
##
##     Copyright University of Winnipeg, 2008
##     Author: Sydney Weidman s.weidman@uwinnipeg.ca
##
##     This program is free software: you can redistribute it and/or modify
##     it under the terms of the GNU General Public License as published by
##     the Free Software Foundation, either version 3 of the License, or
##     (at your option) any later version.
##
##     This program is distributed in the hope that it will be useful,
##     but WITHOUT ANY WARRANTY; without even the implied warranty of
##     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##     GNU General Public License for more details.
##
##     You should have received a copy of the GNU General Public License
##     along with this program.  If not, see <http://www.gnu.org/licenses/>.
##
##############################################################################

from django.contrib import admin
from ojsimport.models import Article, Author, Issue, Section


class ArticleAdmin(admin.ModelAdmin):
    list_filter = ['authors','section','issue']
    list_display = ('title','discipline','date_published','issue')

admin.site.register(Article, ArticleAdmin)


class AuthorAdmin(admin.ModelAdmin):
    ordering = ('lastname',)
    search_fields = ('lastname','firstname')

admin.site.register(Author, AuthorAdmin)


class IssueAdmin(admin.ModelAdmin):
    pass

admin.site.register(Issue, IssueAdmin)


class SectionAdmin(admin.ModelAdmin):
    pass

admin.site.register(Section, SectionAdmin)


